.TH "MP4" "3" "Version 0.9" "Cisco Systems Inc." "MP4 File Format Library"
.SH "NAME"
.LP 
\fBMP4ConvertToTrackDuration\fR \- Convert a duration from a specified time scale to the track time scale.
.SH "SYNTAX"
.LP 
#include <mp4.h>
.LP 
MP4Duration \fBMP4ConvertToTrackDuration\fR(
.br 
	MP4FileHandle \fIhFile\fP,
.br 
	MP4TrackId \fItrackId\fP,
.br 
	u_int64_t \fIduration\fP,
.br 
	u_int32_t \fIoldTimeScale\fP
.br 
)
.SH "ARGUMENTS"
.LP 
.TP 
\fIhFile\fP
Specifies the mp4 file to which the operation applies.
.TP 
\fItrackId\fP
Specifies the track from which the duration originates.
.TP 
\fIduration\fP
Specifies the duration that is to be converted.
.TP 
\fIoldTimeScale\fP
Specifies the time scale in ticks per second in which the duration is currently expressed.
.SH "RETURN VALUES"
.LP 
Upon success, the duration in the track time scale units. Upon error, MP4_INVALID_DURATION.
.SH "DESCRIPTION"
.LP 
\fBMP4ConvertToTrackDuration\fR converts a duration such as a sample duration from the specified time scale to the track time scale. 
.SH "SEE ALSO"
.LP 
MP4(3) MP4ConvertFromTrackDuration(3)
